﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    SqlConnection connection;
    Authentication authentication;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (((Authentication)Session[GlobalConstant.LOGIN_STATE]).privilege != Authentication.PERSONNELOFFICER)
            {
                Response.Redirect("~/Login.aspx");
            }
        }
    }
    protected void NavigationMenu_MenuItemClick(object sender, MenuEventArgs e)
    {
       
    }
    protected void linkbtnLogout_Click(object sender, EventArgs e)
    {
        Authentication auth = (Authentication)Session[GlobalConstant.LOGIN_STATE];
        auth.privilege = Authentication.VISITOR;
        Response.Redirect("~/Default.aspx");
    }

}
